﻿




function ChangeFont(size, obj) {
    var cha = document.getElementById(obj);
    if (cha) {
        var listcon;
        if (document.all) {
            listcon = cha.all;
        }
        else {
            listcon = cha.getElementsByTagName("*");
        }
        var len = listcon.length;
        for (var i = 0; i < len; i++) {
            listcon[i].style.fontSize = size;
            listcon[i].style.color = "#000";
            listcon[i].style.fontFamily = "Times New Roman";
            listcon[i].style.margin = "2% auto";
            listcon[i].style.lineHeight = "23px";
        }
    }
}



function DoSearchTimTin(txt) {
    var text = document.getElementById(txt);
    if (document.all) {
        window.location.href = '/tim-kiem/' + text.value.replace(/\"/g, '') + ".htm";
    } else {
        document.location.href = "/tim-kiem/" + text.value.replace(/\"/g, '') + ".htm";
    }
};








function LoadImages(id, src) {
    if (id.getAttribute("loi") == null) {
        id.setAttribute("loi", "1");
    } else {
        id.setAttribute("loi", eval(id.getAttribute("loi")) + 1);
    }
    if (eval(id.getAttribute("loi")) >= 2) {
        id.onerror = null;
        id.src = "/Images/no-thumb.png";
    } else {
        id.src = src;
    }
};






function getDocHeight() {
    var w = window, d = document, e = d.documentElement, g = d.getElementsByTagName('body')[0], x = w.innerWidth || e.clientWidth || g.clientWidth, y = w.innerHeight || e.clientHeight || g.clientHeight;
    return y;
}



function removeBGBody() {
    $('body').css('background', 'none');
}

